namespace Org.Loon.Framework.Xna.Game.Action.Scripting.Pack
{

    using Org.Loon.Framework.Xna.Game.Core.Graphics.OpenGL;

    public class PackFrame
    {

        internal int id;

        internal string name;

        internal int width;

        internal int height;

        internal bool flag;

        public PackFrame(LTexturePack.PackEntry p):  this(p.Id(), p.Name(), p.Width(), p.Height())
        {
          
        }

        public PackFrame(int id, string name, int width, int height)
        {
            this.id = id;
            this.name = name;
            this.flag = (name == null) || ("".Equals(name));
            this.width = width;
            this.height = height;
        }

        public bool IsFlag()
        {
            return flag;
        }

        public int GetWidth()
        {
            return width;
        }

        public int GetHeight()
        {
            return height;
        }

        public int GetId()
        {
            return id;
        }

        public string GetName()
        {
            return name;
        }
    }
}
